<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
        "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style type="text/css">
        div.header{
            width: 100%;
            height:100px;

        }
        div.middle1{
            width:100%;
            height:400px;

        }
        div.footer{
            width: 100%;
            height:100px;
            bottom: 5px;
        }
        button {
            width :120px;
            height :64px;
            font-size: 24px;
        }
    </style>
</head>
<body>
<div class="header">
    <img th:src="@{/0.jpeg}" width="100%" height="100px"/><br>
</div>
<div class="middle1">
<form th:action="@{/wel}">
    <table align="center">
        <tr>
            <td><h1>购票结果</h1></td>
            <td align="right"><span class="clock">30</span>秒</td>
        </tr>
        <div th:if="${saleForm.classify==0}">
            <tr>
                <td align="right"><span>单号:</span></td>
                <td><span th:text="${saleForm.getSales()[0].order_Number}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>电话:</span></td>
                <td><span th:text="${saleForm.getSales()[0].phone}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>车号:</span></td>
                <td><span th:text="${saleForm.getSales()[0].car}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>目的地:</span></td>
                <td><span th:text="${saleForm.getSales()[0].destination}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>出发日期:</span></td>
                <td><span th:text="${saleForm.getSales()[0].dtime}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>出发时间:</span></td>
                <td><span th:text="${saleForm.getSales()[0].htimea}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>到达时间:</span></td>
                <td><span th:text="${saleForm.getSales()[0].htimeb}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>金额:</span></td>
                <td><span th:text="${saleForm.getSales()[0].money}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>返还金额:</span></td>
                <td><span th:text="${saleForm.balance}"></span></td>
            </tr>
            <tr>
                <td colspan="2" align="center" height="40"><input type="submit"  value="返回"/></td>
            </tr>
        </div>
        <div th:if="${saleForm.classify==2}">
            <tr>
                <td align="right"><span>单号:</span></td>
                <td><span th:text="${saleForm.getSales()[0].order_Number}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>电话:</span></td>
                <td><span th:text="${saleForm.getSales()[0].phone}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>第一趟车:</span></td>
                <td><span th:text="${saleForm.getSales()[0].car}"></span></td>
                <td align="right"><span>目的地:</span></td>
                <td><span th:text="${saleForm.getSales()[0].destination}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>第二趟车:</span></td>
                <td><span th:text="${saleForm.getSales()[1].car}"></span></td>
                <td align="right"><span>目的地:</span></td>
                <td><span th:text="${saleForm.getSales()[1].destination}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>出发日期:</span></td>
                <td><span th:text="${saleForm.getSales()[0].dtime}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>第一趟车出发时间:</span></td>
                <td><span th:text="${saleForm.getSales()[0].htimea}"></span></td>
                <td align="right"><span>第一趟车到达时间:</span></td>
                <td><span th:text="${saleForm.getSales()[0].htimeb}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>第二趟车出发时间:</span></td>
                <td><span th:text="${saleForm.getSales()[1].htimea}"></span></td>
                <td align="right"><span>第二趟车到达时间:</span></td>
                <td><span th:text="${saleForm.getSales()[1].htimeb}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>金额:</span></td>
                <td><span th:text="${saleForm.getSales()[0].money}"></span></td>
            </tr>
            <tr>
                <td align="right"><span>返还金额:</span></td>
                <td><span th:text="${saleForm.balance}"></span></td>
            </tr>
            <tr>
                <td colspan="2" align="center" height="40"><input type="submit"  value="返回"/></td>
            </tr>
        </div>
        <script>
            var t = 30;
            var time = document.getElementsByClassName("clock")[0];

            function fun() {
                t--;
                time.innerHTML = t;
                if(t <= 0) {
                    // clearInterval(inter);
                    // alert("aaa");
                    //document.location.href("www.baidu.com");
                    // window.location.href("www.baidu.com");
                    javaScript:history.go(-1);
                }
            }
            var inter = setInterval("fun()", 1000);
        </script>
    </table>
</form>
</div>
<div class="footer">
    <img th:src="@{/1.png}" width="100%" height="100px"/><br>
</div>
</body>
</html>